﻿@model PagedList.IPagedList<shop.SanPham>
@using PagedList.Mvc
@{
    ViewBag.Title = "Danh sách sản phẩm";
}
<div id="content">
    <div id="content-header">
        <div id="breadcrumb"> <a href="/admin/sanpham" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a></div>
    </div>   
    <div class="container-fluid">       
        <div class="widget-content">
            @Html.ActionLink("Thêm sản phẩm", "create", "sanpham", new { @class="btn btn-primary"})
            <table class="table table-bordered table-striped with-check">
                <thead>
                    <tr>
                        <th><input type="checkbox" id="title-table-checkbox" name="title-table-checkbox" /></th>
                        <th>Tên sản phẩm</th>
                        <th>Hình Ảnh</th>
                        <th>Giá tiền</th>
                        <th>Chức năng</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td><input type="checkbox" value="@item.ID" /></td>
                            <td>@item.TenSP</td>
                            <td>
                                <img width="75" src="/images/sanpham/@item.HinhAnh" />
                            </td>
                            <td>@string.Format("{0:0,0 đ}", item.Gia)</td>
                            <td class="center">
                               
                                @Html.ActionLink("Sửa", "edit", new { id = item.ID }, new { @class = "btn btn-primary btn-mini" })
                                @Html.ActionLink("Xóa", "Delete", new { id = item.ID }, new { @class = "delete-link btn btn-danger btn-mini" })
                               
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        @Html.PagedListPager(Model, page => Url.Action("index", new { page }))
        </div>
    </div>
</div>
<div class="row-fluid">
    <div id="footer" class="span12"> 2012 &copy; Marutii Admin. Brought to you by <a href="http://themedesigner.in">Themedesigner.in</a> </div>
</div>
<div id="delete-dialog" title="Thông báo">
    <p>Bạn có muốn xóa sản phẩm này không</p>
</div>
@Html.Hidden("TrueString", Boolean.TrueString)

<div class="md-overlay"></div><!-- the overlay element -->
<script src="~/Content/themes/maruti/js/jquery.min.js"></script>
<script src="~/Content/themes/maruti/js/jquery.ui.custom.js"></script>
<script src="~/Content/themes/maruti/js/bootstrap.min.js"></script>
<script src="~/Content/themes/maruti/js/jquery.uniform.js"></script>
<script src="~/Scripts/jquery-ui-1.8.24.js"></script>
<script src="~/Content/themes/maruti/js/select2.min.js"></script>
<script src="~/Content/themes/maruti/js/jquery.dataTables.min.js"></script>
<script src="~/Content/themes/maruti/js/maruti.js"></script>
<script src="~/Content/themes/maruti/js/maruti.tables.js"></script>
<script src="~/Content/themes/maruti/js/sanpham.js"></script>

<script src="~/Scripts/knockout-2.2.0.js"></script> 
@*<script src="~/Content/themes/maruti/dialog/js/modernizr.custom.js"></script>
<script src="~/Content/themes/maruti/dialog/js/classie.js"></script>    
<script src="~/Content/themes/maruti/dialog/js/modalEffects.js"></script>
<script>
    // this is important for IEs
    var polyfilter_scriptpath = '/content/themes/maruti/dialog/js/';
</script>
<script src="~/Content/themes/maruti/dialog/js/cssParser.js"></script>
<script src="~/Content/themes/maruti/dialog/js/css-filters-polyfill.js"></script>*@
